{extend name="public:base" /}

{block name="title"}<title>FileUpload挂件</title>{/block}

{block name="pjax_container"}
<section class="content-header">
    <h1>FileUpload挂件</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST" action="" >
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab1" data-toggle="tab">FileUpload挂件</a></li>
                        <li><a href="#tab2" data-toggle="tab">Code</a></li>
                        <li><a href="#tab3" data-toggle="tab">说明</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab1">
<div class="alert alert-danger">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
    <p>如果你在上传配置项配置了：文件上传域名地址【image_url => 当前域名 或 其他域名】，那么上传图片的返回地址前会加上配置的域名地址。</p>
    <p>请勿随意填写【文件上传域名地址】，否则会导致上传图片的返回地址错误，若无特殊通途，保持【文件上传域名地址】为空即可。</p>
</div>
{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传',
    'placeholder' => '图片上传',
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传2',
    'placeholder' => '图片上传2',
    'title_col' => '3',
    'content_col' => '6',
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'file',
    'title' => 'file上传',
    'placeholder' => 'file上传',
    'type' => 'file'
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'flash',
    'title' => 'flash上传',
    'placeholder' => 'flash上传',
    'type' => 'flash'
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'media',
    'title' => 'media上传',
    'placeholder' => 'media上传',
    'type' => 'media'
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传',
    'placeholder' => '图片上传',
    'readonly' => 'readonly',
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传',
    'placeholder' => '图片上传',
    'disabled' => 'disabled',
]])}
                        </div>
                        <div class="tab-pane" id="tab2">
                            <pre>
{literal}
{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传',
    'placeholder' => '图片上传',
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传2',
    'placeholder' => '图片上传2',
    'title_col' => '3',
    'content_col' => '6',
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'file',
    'title' => 'file上传',
    'placeholder' => 'file上传',
    'type' => 'file'
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'flash',
    'title' => 'flash上传',
    'placeholder' => 'flash上传',
    'type' => 'flash'
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'media',
    'title' => 'media上传',
    'placeholder' => 'media上传',
    'type' => 'media'
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传',
    'placeholder' => '图片上传',
    'readonly' => 'readonly',
]])}

{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',
    'title' => '图片上传',
    'placeholder' => '图片上传',
    'disabled' => 'disabled',
]])}
{/literal}
                            </pre>
                        </div>
                        <div class="tab-pane" id="tab3">
                            <pre>
{literal}
{:widget('common/FileUpload/index', [$data, [
    'name' => 'files',              <code>//组件标签name属性值，对应数据库字段【必须】</code>
    'title' => '图片上传',           <code>//组件标题【必须】</code>
    'placeholder' => '图片上传',     <code>//提示内容【非必须】</code>
    'title_col' => '2',             <code>//标题占比（默认2）【非必须】</code>
    'content_col' => '7',           <code>//内容占比（默认7）【非必须】</code>
    'readonly' => 'readonly',       <code>//只读【非必须】</code>
    'disabled' => 'disabled',       <code>//禁用【非必须】</code>
]])}
{/literal}
                            </pre>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</section>
{/block}